
import calendar
import datetime
import sys
import re

dtnow_plain = lambda : re.sub('[-. :]', '', str(datetime.datetime.now())[:19])
#20080716194418

def main(y=''):
    """ """
    #calendar.prmonth(2007,3)
    if y == '':
        print calendar.prcal(int(dtnow_plain()[:4]))
    else:
        print calendar.prcal(int(y))

if __name__ == "__main__":
    ''' '''
    if len(sys.argv) == 1:
        main()
    elif len(sys.argv) == 2:
        main(sys.argv[1])
    else:
        print """

        Show year calendar for selected year.
        
        calendar_year [<year>]

        example: calendar_year
        example: calendar_year 2011

        year (optional)
            defines for which year (if not actual) ahouls calendar be printed
        """
